#{extends 'relationsHome.html' /} #{set title:'Relation' /} #{set 'moreStyles'}
<link rel="stylesheet" href="@{'/public/stylesheets/forms.css'}">
<link rel="stylesheet" href="@{'/public/stylesheets/css3buttons.css'}"
	media="screen">
<br/>
<br/>
#{/set}

<br/>
<p>
		<b><i>Rename Relation</i></b>
	</p>
	<hr>
	
	


<div class="content">
			<div class="row">
    	<div class="left">Source</div>
    	
    <form action="@{Relations.renameDone()}" method="POST">
    	
				<div class="right">${relation.type} ${relation.source}</div>
</div>

    <div class="row">
        	<div class="left">Name</div>
			    	<div class="right">
		#{if task.size() > 0 }
    #{select 'newRelationName', value:1, id:'select1'}
    #{option relation.relationName}${relation.relationName}#{/option}
    #{list items:0..task.size()-1, as:'i'}
     #{if task.get(i).relationName != relation.relationName}
    #{option task.get(i).relationName} ${task.get(i).relationName} #{/option}
      #{/if}
    #{/list}
    #{/select}
#{/if}
#{else}
    No Relation Names
#{/else}



			
<br/>
        </div>
				</div>
				 <div class="row">
        	<div class="left">Destination</div>
			    	<div class="right"> ${relation.type} ${relation.destination}</div>
				</div>
				</div>
				
				#{if flash.error}
    <p style="color:#c00">
        ${flash.error}
    </p>
#{/if}	
				
				<div class="content">
			<div class="row">
				<div class="left"></div>
				<div class="right">
					<input type="submit" value="Done">
				</div>
				
			</div>
			
			</form>
